import React from 'react'
import { StyleSheet, Text, View } from 'react-native'

export default function NavHeader({ title, onPress }: { to: string; title?: string; onPress?: Function }) {
    const onBack = () => {
        onPress && onPress()
    }

    return (
        <View style={styles.header}>
            {/* <Ionicon name='arrow-back-outline' size={26} color='#333' style={{ width: 40 }} onPress={onBack}></Ionicon> */}
            <Text style={{ flex: 1, color: '#333', textAlign: 'center', fontSize: 18 }}>{title}</Text>
            <Text style={{ width: 40 }}></Text>
        </View>
    )
}

const styles = StyleSheet.create({
    header: {
        flexDirection: 'row',
        backgroundColor: '#F5F5F5',
        height: 88,
        paddingTop: 24,
        paddingHorizontal: 16,
        alignItems: 'center'
    }
})
